<template>
  <div class="map">
    <baidu-map class="map" :center="center" :zoom="zoom" @ready="handler"></baidu-map>
  </div>
</template>

<script setup>
const center = ref({lng: 0, lat: 0});
const zoom = ref(3);

const handler = ({BMap, map}) => {
  console.log(BMap, map);
  center.value.lng = 113.31;
  center.value.lat = 23.1;
  zoom.value = 15;
}
</script>

<style>
.map {
  width: 100%;
  height: 95vh;
}
</style>